<?php /* Smarty version 2.6.18, created on 2016-12-09 16:03:01
         compiled from pay/pay.monthupdate.tpl.php */ ?>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "index.header.tpl.php", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "index.left.tpl.php", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
  <!--主要内容开始-->
  <div class="content-wrapper">
    <section class="content">
      <div class="row">
        <section class="col-lg-12 connectedSortable">
         <div class="box box-default box-solid">
             <form name="form1" action="" method="post">
                <div class="box-header with-border">
                    <span class="fa fa-table" style="float:left; font-size:18px; margin-top:2px; color:#3c8dbc;" ></span>
                    <p class="box-title">奖励性绩效工资表</p>
                </div>
                <div class="box-body">
                      <h3 class="text-center"><?php echo $this->_tpl_vars['semester_data']['semester_name']; ?>
（第<?php echo $this->_tpl_vars['pay_month']; ?>
学月）学校教职工奖励性绩效工作分配统计表</h3>
                      <table class="table table-bordered">   
                             <tr>
                                <td rowspan="2">编号</td>
                                <td rowspan="2">姓名</td>
                                <td rowspan="2">班主任补贴</td>
                                <td rowspan="2">职务补贴</td>
                                <td colspan="2">出勤补贴</td>
                                <td colspan="4" align="center">工作量补贴</td>
                                <td rowspan="2">其他</td>
                                <td colspan="6" align="center">应扣</td>
							 </tr>
                             <tr>
                                <td>全勤</td>
                                <td>值日</td>
                                <td>作业</td>
                                <td>课时</td>
                                <td>超课时</td>
                                <td>代课</td>
                                <td>节数</td>
                                <td>金额</td>
                                <td>会旗</td>
                                <td>金额</td>
                                <td>其它</td>
							 </tr>
							 <?php $_from = $this->_tpl_vars['out_lists']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['key'] => $this->_tpl_vars['value']):
?>
                             <tr>
                                <td><?php echo $this->_tpl_vars['value']['lists']['staff_number']; ?>
</td>
                                <td><?php echo $this->_tpl_vars['value']['lists']['staff_name']; ?>
</td>
                                <td><input name="class_<?php echo $this->_tpl_vars['value']['staff_id']; ?>
" value="<?php echo $this->_tpl_vars['value']['lists']['class']; ?>
" type="text" style="width:100%"></td>
                                <td><input name="job_<?php echo $this->_tpl_vars['value']['staff_id']; ?>
" value="<?php echo $this->_tpl_vars['value']['lists']['job']; ?>
"  type="text" style="width:100%"></td>
                                <td><input name="check_<?php echo $this->_tpl_vars['value']['staff_id']; ?>
" value="<?php echo $this->_tpl_vars['value']['lists']['check']; ?>
"  type="text" style="width:100%"></td>
                                <td><input name="duty_<?php echo $this->_tpl_vars['value']['staff_id']; ?>
" value="<?php echo $this->_tpl_vars['value']['lists']['duty']; ?>
"  type="text" style="width:100%"></td>
                                <td><input name="home_<?php echo $this->_tpl_vars['value']['staff_id']; ?>
" value="<?php echo $this->_tpl_vars['value']['lists']['home']; ?>
"  type="text" style="width:100%"></td>
                                <td><input name="hour_<?php echo $this->_tpl_vars['value']['staff_id']; ?>
" value="<?php echo $this->_tpl_vars['value']['lists']['hour']; ?>
"  type="text" style="width:100%"></td>
                                <td><input name="uphour_<?php echo $this->_tpl_vars['value']['staff_id']; ?>
" value="<?php echo $this->_tpl_vars['value']['lists']['uphour']; ?>
"  type="text" style="width:100%"></td>
                                <td><input name="adjust_<?php echo $this->_tpl_vars['value']['staff_id']; ?>
" value="<?php echo $this->_tpl_vars['value']['lists']['adjust']; ?>
"  type="text" style="width:100%"></td>
                                <td><input name="other_<?php echo $this->_tpl_vars['value']['staff_id']; ?>
" value="<?php echo $this->_tpl_vars['value']['lists']['other']; ?>
"  id="jia<?php echo $this->_tpl_vars['key']; ?>
" class="jia" style="width:50%" /> <span class="niu" onclick="ab(<?php echo $this->_tpl_vars['key']; ?>
, 'jia')">+</span> </td>
                                <td><input name="costa_<?php echo $this->_tpl_vars['value']['staff_id']; ?>
" value="<?php echo $this->_tpl_vars['value']['lists']['costa']; ?>
"  type="text" style="width:100%"></td>
                                <td><input name="costb_<?php echo $this->_tpl_vars['value']['staff_id']; ?>
" value="<?php echo $this->_tpl_vars['value']['lists']['costb']; ?>
"  type="text" style="width:100%"></td>
                                <td><input name="costc_<?php echo $this->_tpl_vars['value']['staff_id']; ?>
" value="<?php echo $this->_tpl_vars['value']['lists']['costc']; ?>
"  type="text" style="width:100%"></td>
                                <td><input name="costd_<?php echo $this->_tpl_vars['value']['staff_id']; ?>
" value="<?php echo $this->_tpl_vars['value']['lists']['costd']; ?>
"  type="text" style="width:100%"></td>
                                <td><input name="coste_<?php echo $this->_tpl_vars['value']['staff_id']; ?>
" value="<?php echo $this->_tpl_vars['value']['lists']['coste']; ?>
"  type="text"  style="width:100%"></td>
							 </tr>
							 <?php endforeach; endif; unset($_from); ?>

						 </table>      	   
				    </div><!--box-body --> 
                    <div class="box-footer text-center">
                        <button type="submit" class="btn btn-primary"> 确 定</button>   	   
                    </div>
                 </form>
             </div><!--box box-default box-solid-->
          </section>   
        </div><!--row-->
    </section>
 </div>
 <?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "index.footer.tpl.php", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
<script>
function ab(id, c){
	var s = 0;
    var d = $("." + c);
	var g = "#" + c;
	// 遍历
	$.each(d, function (k, v){		

		if( $(this).val() == "" ){
			var i = k+1;
			// 一个不为空
			if($(g+k).val() != ""){
				s = $(g+k).val();
			}
			if(i <= id){
				$(g+i).val(s);
			}		
		}
  });
};

</script>

